package cn.edu.usst.cs.goldfish.booking.meetingroom.util;

import org.springframework.context.annotation.Configuration;

import jakarta.annotation.PostConstruct;

@Configuration
public class RedisShutdownHook {

    private final RedisUtil redisUtil;

    public RedisShutdownHook(RedisUtil redisUtil) {
        this.redisUtil = redisUtil;
    }

    @PostConstruct
    public void init() {
        // 清空Redis缓存
//        Runtime.getRuntime().addShutdownHook(new Thread(redisUtil::deleteAll, "Redis-Shutdown-Hook"));
    }
}